<?php 

function loginBB($username,$userpass) { 
	$bbresponse = file_get_contents("http://bbapi.buzzerbeater.com/login.aspx?login=" . $username . "&code=" . $userpass . "&quickinfo=1");
	$xml = simplexml_load_string($bbresponse);
	/*
	$errorString = "";
	if() { 
	foreach($xml->error->attributes() as $a => $b) {
  		$errorString = $a . '="' . $b . "\"</br>";
  	}
	*/
	if(is_object($xml->error[0])) { 
		return false;
	} else { 
		return true;
	}
}

function teamInfoBB($username,$userpass) {
	$bbresponse = file_get_contents("http://bbapi.buzzerbeater.com/login.aspx?login=" . $username . "&code=" . $userpass . "&quickinfo=1");
	$xml = simplexml_load_string($bbresponse);
	if(is_object($xml->error[0])) {
		return false;
	} else { 
		return $xml;
	}
}

function teamRosterBB($username) {
		
}

?>